<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE HTML>
<html lang="en-US">
<head>
	<meta charset="UTF-8">
	
	<link rel="stylesheet" href="css/bootstrap.min.css" type="text/css" />
	<script type="text/javascript" src="js/jquery.js"></script>
	<script type="text/javascript" src="js/bootstrap.min.js"></script>
	<style type="text/css">
		
		
		
	</style>
	
	<title>CRM-个人信息</title>
</head>
<body>
		<%@ include file="include/base.jsp" %>
		<%@ include file="include/base-top.jsp" %>
		

	<div class="body">
		<div class="container ">
			<h2>个人信息</h2>
			<hr/>
			<div class="companyName">
				<div id="pagename">
					<h2 id="bigname" style="display:inline">${employee.name }
						<h5 onclick="editname()" style="display:inline"><small>修改名称</small></h5>
					</h2>
				</div>
				<div id="hidename" style="display:none">
					<input type="text" id="name" name="employee.name" value="${employee.name }"/>
					&nbsp&nbsp
					<button id="editname" class="btn btn-mini btn-primary">点击保存</button>
					<span id="close" class="add-on">X</span>
				</div>
				
			</div>
			<hr/>
			<div class="picture">
				
				<img src="upload/${employee.pic }" style="width:60px;height:60px;background-color:#ccc"></img>
				<img alt="" src="upload/a.png" style="width:100px;height:100px;background-color:#ccc;margin-right:20px"></img>
				<form action="uploadpic.jspx" method="post" enctype="multipart/form-data">
					请选择您要上传的头像<input type="file" name="pic"/>
					<input type="submit" value="上传"/>
				</form>
			</div>
			<div class="updatePwe">
				
			</div>
		
		</div>
		
	</div>
	
	<script type="text/javascript">
	
		function editname(){
			$('#pagename').hide();
			$('#hidename').show();
		}
	
		$(document).ready(function(){
		
			$('#close').click(function(){
				$('#pagename').show();
				$('#hidename').hide();
			});
			
			
		
			$('#editname').click(function(){
				var name = $('#name').val();
			
				$.get("editname.jspx",{name:name},function(xml){
					if(xml == false){
						$('#pagename').show();
						$('#hidename').hide();
						$('#bigname').text(name);
					}
				});
				
			});
			
		});
	</script>
</body>
</html>
